<{include file="public_html/header.html"}>
<{include file="public_html/left_menu.html"}>
<script type="text/javascript">
	var dire = 'video';
	var thumb = 'big_thumb,middle_thumb,small_thumb';
	var fileNumLimit = 1;
</script>
<div id="content" class="span10">
	<!-- content starts -->
	<div>
		<ul class="breadcrumb">
			<li>
				<a href="/video">游戏视频管理</a> <span class="divider">/</span>
			</li>
			<li>
				<a href="javascript:void(0);"><{$action}></a>
			</li>
		</ul>
	</div>

	<div class="row-fluid sortable">
		<div class="box span12">
			<div class="box-header well" data-original-title>
				<h2><i class="icon-edit"></i> <{$action}></h2>
				<div class="box-icon">
					<!-- <a href="#" class="btn btn-setting btn-round"><i class="icon-cog"></i></a> -->
					<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
					<!-- <a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a> -->
				</div>
			</div>
			<div class="box-content">
				<form class="form-horizontal" method="post" enctype="multipart/form-data" action="/video/edit">
					<input type="hidden" name="id" value="<{$videos_info['id']|default:""}>">
			  		<fieldset class="table_switch">
						<div class="control-group oi_re">
					  		<label class="control-label" for="typeahead"><font color="red">*</font>视频标题： </label>
						  	<div class="controls">
								<input type="text" class="inputxt-xlarge Validform_error" id="date01" name="title" datatype="*" value="<{$videos_info['title']|default:""}>">
						  	</div>
						  	<div class="Validform_checktip oi_ab ab_380px"></div>
						</div>
						<div class="control-group" id="upload_main">
							<label class="control-label" for="date01">绑定联盟：</label>
							<div class="controls ysx_video">
								<input id="video_aid" class="vcid" type="hidden" value="<{$videos_info['aid']|default:'0'}>" name="aid">
								<input id="video_aid_title" class="inputxt-xlarge alliance_title" type="text" value="<{$videos_info['aid']|default:''}>" readonly="true">	
							</div>
						</div> 
						<div class="control-group oi_re">
					  		<label class="control-label" for="typeahead">视频标题首字母： </label>
						  	<div class="controls">
								<input type="text" class="inputxt-xlarge Validform_error" id="date01" name="first_letter" value="<{$videos_info['first_letter']|default:""}>">
						  	</div>
						</div>
						<div class="control-group oi_re">
					  		<label class="control-label" for="typeahead">视频方向基准： </label>
						  	<div class="controls">
								<select size="1" name="orinetation" aria-controls="DataTables_Table_1">
									<option value="0">请选基准</option>
									<option value="1" <{if $videos_info['orinetation']|default:"" eq 1}>selected="selected"<{/if}>>home键向下</option>
									<option value="2" <{if $videos_info['orinetation']|default:"" eq 2}>selected="selected"<{/if}>>home键向右</option>
									<option value="3" <{if $videos_info['orinetation']|default:"" eq 3}>selected="selected"<{/if}>>home键向上</option>
									<option value="4" <{if $videos_info['orinetation']|default:"" eq 4}>selected="selected"<{/if}>>home键向左</option>
								</select>
						  	</div>
						</div>
						<div class="control-group oi_re">
					  		<label class="control-label" for="typeahead">所属分类： </label>
						  	<div class="controls">
								<select size="1" name="cate_id" aria-controls="DataTables_Table_1">
									<option value="0">请选择</option>
									<{foreach from=$cate_list item=cate}>
										<option value="<{$cate.id}>" <{if $videos_info['cate_id']|default:"0" eq $cate.id}>selected="selected"<{/if}>><{$cate.name}></option>
								    <{/foreach}>
								</select>
						  	</div>
						</div>
						<div class="control-group oi_re">
					  		<label class="control-label" for="typeahead">真实点击量： </label>
						  	<div class="controls">
								<input type="text" class="inputxt-xlarge Validform_error" id="date01" name="real_click_num" value="<{$videos_info['real_click_num']|default:"0"}>">
						  	</div>
						</div>

						<div class="control-group oi_re">
					  		<label class="control-label" for="typeahead">虚拟点击量： </label>
						  	<div class="controls">
								<input type="text" class="inputxt-xlarge Validform_error" id="date01" name="click_num" value="<{$videos_info['click_num']|default:""}>">
						  	</div>
						</div>
						<!-- <div class="control-group oi_re">
					  		<label class="control-label" for="typeahead">点击量基数： </label>
						  	<div class="controls">
								<input type="text" class="inputxt-xlarge Validform_error" id="date01" name="base_click" value="<{$videos_info['base_click']|default:0}>">
						  	</div>
						</div> -->
						<div class="control-group oi_re">
					  		<label class="control-label" for="typeahead">赞数量： </label>
						  	<div class="controls">
								<input type="text" class="inputxt-xlarge Validform_error" id="date01" name="up_count" value="<{$videos_info['up_count']|default:0}>">
						  	</div>
						</div>
						<div class="control-group oi_re">
						  	<label class="control-label" for="typeahead">展示图片： </label>
							    <div class="controls">
							    	<input type="hidden" id="token" value="<{$token}>" />
							  		<{if isset($videos_info['image_url']) AND $videos_info['image_url'] != ''}>
							  		<img src="<{$videos_info['image_url']}>" />
							  		<{/if}>
						            <div id="uploader2" class="upload_box" style="float:left;">
						                <div class="queueList">
						                    <div id="dndArea2" class="placeholder dndArea">
						                        <div id="filePicker2" class="filePicker"></div>
						                        <p>或将照片拖到这里，最多可上传<script>document.write(fileNumLimit);</script>张图片</p>
						                    </div>
						                </div>
						                <div class="statusBar" style="display:none;">
						                    <div class="progress">
						                        <span class="text">0%</span>
						                        <span class="percentage"></span>
						                    </div><div class="info"></div>
						                    <div class="btns">
						                        <div id="filePickerBut2" class="filePickerBut"></div><div class="uploadBtn">开始上传</div>
						                    </div>
						                </div>
						                <div class="upload_img_input" input_name='image_url'></div>
						            </div>
						  		</div>
	                      	<div class="Validform_checktip oi_ab ab_380px"></div>
						</div>
						<div class="control-group">
						  	<label class="control-label" for="date01">视频路径：</label>
						  	<div class="controls">
								<input type="text" class="input-xlarge" name="video_url" value="<{$videos_info['video_url']|default:""}>" readonly>
						  	</div>
						</div>
						<div class="control-group" id="upload_main">
							<label class="control-label" for="date01">绑定标签：</label>
							<div class="controls">
								<input class="inputxt-xlarge vtid_title" type="text" readonly="true">	
								<a target="_blank" href="/tag_relation/index/1/0/<{$videos_info['id']|default:"0"}>">查看此视频的关系</a>
								<ul id="tag_list">
									<{if $tag_relation_list}>
										<{foreach from=$tag_relation_list item=item}>
											<li>
												<input type="hidden" value="<{$item.tid}>" name="tag[tid][]" class="tag_id">
												<span class="tag_name"><{$item.name}></span>
											</li>
										<{/foreach}>
									<{/if}>
									
								</ul>
							</div>
						</div> 
						<div class="control-group">
						  	<label class="control-label" for="date01">app活动：</label>
						  	<div class="controls">
								<select class=" " name="activity_id" data-rel="chosen">
									<option value="0">不参加活动</option>
									<{foreach from=$activity_list item=item}>
										<option value="<{$item.id}>" <{if $videos_info['activity_id'] == $item.id}>selected<{/if}>><{$item.title}></option>
									<{/foreach}>
								</select>
						  	</div>
						</div>
						
						
						<div class="control-group">
						  	<label class="control-label" for="date01">排序：</label>
						  	<div class="controls">
								<input type="text" class="input-xlarge" name="sort" maxlength="4" value="<{$videos_info['sort']|default:""}>">
						  	</div>
						</div>
						<div class="control-group">
						  	<label class="control-label" for="date01">隐藏显示设置：</label>
						  	<div class="controls">
							  	<label class="radio">
									<div class="radio" id="uniform-optionsRadios1" style="float:left"><span class="checked"><input type="radio" name="status" <{if $videos_info['status']|default:"" eq 1}>checked="checked"<{/if}> id="sort" value="1"></span></div>显示
							  	</label>
							  	<div style="clear:both"></div>
							  	<label class="radio">
									<div class="radio" id="uniform-optionsRadios2" style="float:left"><span><input type="radio" name="status" id="sort" value="0" <{if $videos_info['status']|default:"" eq 0}>checked="checked"<{/if}>></span></div>隐藏
							  	</label>
							</div>
						</div>        
						<div class="form-actions">
						  	<button type="submit" class="btn btn-primary">保存</button>
						  	<button type="reset" class="btn">重置</button>
						</div>
				  	</fieldset>
				</form>   
				
			</div>
		</div><!--/span-->
	</div><!--/row-->
			<!-- content ends -->
	</div><!--/#content.span10-->
		</div><!--/fluid-row-->
<script>
	$(document).on('click', '.alliance_title', function(){
		art.dialog({id:'video_select',iframe:'alliance/index/', title:'选择联盟', width:'1000', height:'700', lock:true});
	});
	$(document).on('click', '.vtid_title', function(){
		var input_id ='tag';
		art.dialog({id:'tag_select',iframe:'tag/index/0/'+input_id, title:'选择标签', width:'1000', height:'700', lock:true});
	});
</script>
<{include file="public_html/footer.html"}>